package com.huawei.spider.cnki.plugins;

import java.util.Map;

/**
 * @Author: liminghui
 * @Date: 2020/5/16 23:44
 * @Version:
 * @Description: 爬虫主类
 */
public class CnkiSpider {

    public static void main(String[] args) throws Exception {
        //1.获取用户输入信息
        UserInput userInput = new UserInput();
        Map<String, String> ueser_input = userInput.get_uesr_inpt();
        //2.构建搜索下载并将数据保存
        SearchTools searchTools = new SearchTools();
        //2.1清空目标文件夹下所有文件
        searchTools.deleteData("data");
        //2.2http请求获取数据
        searchTools.search_reference(ueser_input);
        //2.3将数据写入excel等
        searchTools.writeToExcel();
    }


}
